{{define "9IPHP/side"}}
<aside class="side">
    {{if .ToC}}
    <div id="hideToc" aria-label="{{.I18n.CloseToc}}" class="btn__fix pipe-tooltipped pipe-tooltipped--w">
        <svg><use xlink:href="#icon-close"></use></svg>
    </div>
    <div id="showToc" aria-label="{{.I18n.Toc}}" class="btn__fix fn__none pipe-tooltipped pipe-tooltipped--w">
        <svg><use xlink:href="#icon-toc"></use></svg>
    </div>
    <div class="side__toc module module__list">
        {{.ToC}}
    </div>
    {{end}}

    <div{{if .ToC}} class="fn__none"{{end}}>
        {{if eq .Setting.BasicNoticeBoard ""}}
        {{else}}
        <div class="side__ad">
            {{.Setting.BasicNoticeBoard}}
        </div>
        {{end}}
        {{if le 1 (len .MostUseTags)}}
        <div class="module">
            <div class="module__header">
                {{.I18n.Tags}}
            </div>
            <div class="fn__clear module__body module__body--tag">
                {{range .MostUseTags}}
                <a class="tag" href="{{.URL}}">{{.Title}}</a>
                {{end}}
            </div>
        </div>
        {{end}}

        {{if le 1 (len .MostUseCategories)}}
        <div class="module">
            <div class="module__header">
                {{.I18n.Categories}}
            </div>
            <div class="module__body module__body--tag fn__clear">
                {{range .MostUseCategories}}
                <a class="tag" href="{{.URL}}">{{.Title}}</a>
                {{end}}
            </div>
        </div>
        {{end}}
        {{template "9IPHP/module-list" dict "List" .RecentComments "Title" .I18n.RecentComment "UserCount" 2}}
        {{template "9IPHP/module-list" dict "List" .MostCommentArticles "Title" .I18n.MostCommentArticle "UserCount" .UserCount}}
        {{template "9IPHP/module-list" dict "List" .MostViewArticles "Title" .I18n.MostViewArticle "UserCount" .UserCount}}
    </div>
</aside>
{{end}}